The present invention relates generally to data compression, and in particular to systems and methods for compressing text and data in a PDA.
Navigational devices are well known. The capabilities of navigational devices and methods depend on system resources, such as processor speed and the amount and speed of memory. The processes implemented by a navigation device are a function of overall system cost because an increase in system capability also increases system cost. The known art includes a spectrum of products in which the degree of navigational accuracy is dictated primarily by the cost of the system. The lower cost systems currently offer a lower degree of accuracy that often is inadequate for most users. Other devices also depend on system resources, such as processor speed and the amount and speed of memory.
The known art compresses data, including text, in an attempt to improve the efficiency of the system resources. That is, compression improves the performance of a system that has a limited processor speed and a limited amount and speed of memory. Compressing data involves encoding data, and this encoded data is decoded for an end use in a device. For example, a navigational device end use includes, but is not limited to, displaying text or other cartographic data. One conventional method for encoding and decoding data, particularly text data, involves Huffman codes or canonical Huffman codes. Huffman codes and canonical Huffman codes will be described in more detail below.
Decoding the encoded data often involves a time-space tradeoff. Increasing the allocated space for a decoding structure typically increases the speed of the decoding operation; whereas decreasing the allocated space for a decoding structure often decreases the speed of the decoding operation. In certain applications, it is desired to balance the competing needs of decoding speed and memory space so that an adequate decoding speed is achieved using an acceptable amount of memory. For example, in certain applications, it may be desired to reduce the memory space taken up by the decoding structure at the expense of an acceptable slowing of the decoding speed. In other applications, it may be desired to increase the speed of the decoding operation at the expense of an acceptable amount of additional memory space taken up by the decoding structure.
Therefore, there exists a need for a data compression system and method which provides design flexibility by allowing design choices to be made to increase decoding speed by adding more space to the decoding structure or to decrease the decoding structure space and decrease the decoding speed.
The above mentioned problems of navigational devices are addressed by the present invention and will be understood by reading and studying the following specification. Systems and methods are provided to compress data, and in particular to code and decode data using canonical Huffman codes. These systems and methods are incorporated into navigational devices in one embodiment. However, the invention is not so limited.
An acceleration table is provided to extract high-frequency data using a direct index lookup and bracketing indices to provide bounds for a secondary search. In one embodiment, the secondary search is a binary search. A binary search table is provided to extract base canonical Huffman codes for each bit length of the encoded data, from which low-frequency data indices are derived to extract low-frequency data. Thus, the present invention provides design flexibility by allowing choices to be made with respect to balancing the competing needs of space and speed by, for example, increasing decoding speed by adding more space to the acceleration table in the decoding structure or decreasing the decoding structure space to conserve memory space at the expense of decreasing the decoding speed by an acceptable amount. A faster decoding speed allows a navigation device that has a limited processor and memory speed to provide more navigation data to a user in a timely manner. A smaller decoding structure allows more memory in a limited memory navigation device to be allocated for other purposes.
One aspect provides a data structure stored on a computer readable medium. According to one embodiment, the data structure includes a field representing a decoding structure to decode canonical Huffman encoded data, and a field representing a symbol table. The decoding structure includes a field representing an accelerator table to receive N bits from the encoded data to perform a 2N-deep direct-index lookup to provide a high-frequency symbol index for high-frequency data and to provide bracketing indices for low-frequency data. The decoding structure also includes a field representing a binary search table to provide a low-frequency symbol index using a binary search bounded by the bracketing indices provided by the accelerator table. The symbol table is adapted to provide a high-frequency symbol associated with the high-frequency index and a low-frequency symbol associated with the low-frequency symbol index.
Other aspects provided herein include an electronic navigational device, a navigation system, and a method for decoding encoded data. These, as well as other novel aspects, embodiments, advantages, details, and features of the present invention, will be apparent to those skilled in the art from the following detailed description of the invention, the attached claims and accompanying drawings, listed herein below, which are useful in explaining the invention.